// eslint-disable-next-line import/no-unresolved
import {PageHeaderWrapper} from '@ant-design/pro-layout';
import React, {Component} from 'react';
import {Row, Col, Alert, Table, Card} from 'antd';
import {connect} from 'dva';
import styles from './index.less';
import {FormattedMessage} from "umi-plugin-react/locale";

class Dashboard extends Component {


  render() {

    const columns = [
      {
        title: '操作',
        dataIndex: '',
        key: 'x',
        render: (text, record) => (
          <span>
        <a style={{marginRight: 16}}>编辑</a>
        <a>删除</a>
      </span>
        ),
      },
      {
        title: '看板', dataIndex: 'dashboard', key: 'dashboard',
        render: (text, record) => (
        <a>{record.dashboard}</a>
        ),
      },
      {title: '创建者', dataIndex: 'creator', key: 'creator'},
      {title: '发布', dataIndex: 'published', key: 'published'},
      {title: '修改时间', dataIndex: 'modified', key: 'modified'},
    ];

    const data = [
      {
        dashboard: '疫情数据',
        creator: 'lifeng',
        published: 'True',
        modified: '2 Month Ago',
      }];


    return (
      <div className={styles.main}>
        <Card>
          <Table
            columns={columns}
            dataSource={data}
          />
        </Card>

        {/* <div style={{paddingTop: 100, textAlign: 'center'}}> */}
        {/*  <Spin spinning={loading} size="large"></Spin> */}
        {/* </div> */}
        {/*{userList}*/}
      </div>)
  }

}

// 这里使用析构,拆出state中的demo
// demo对象 即models/demo.js中的state对象
export default connect(({demo}) => ({
  listInfo: demo.listInfo,
}))(Dashboard);
